﻿Imports System.Configuration

Namespace Connection

    ''' <summary>
    ''' コネクション文字列要素
    ''' </summary>
    ''' <remarks></remarks>
    Public Class ConnectionStringElement
        Inherits ConfigurationElement

        ''' <summary>
        ''' データベース接続文字列
        ''' </summary>
        <ConfigurationProperty("value", IsRequired:=True)>
        Public Property Value() As String
            Get
                Return DirectCast(Me("value"), String)
            End Get
            Set(ByVal value As String)
                Me("value") = value
            End Set
        End Property

        ''' <summary>
        ''' 暗号化されているかどうか
        ''' </summary>
        <ConfigurationProperty("is-encrypt", IsRequired:=False, DefaultValue:=False)>
        Public Property IsEncrypt() As Boolean
            Get
                Return DirectCast(Me("is-encrypt"), Boolean)
            End Get
            Set(ByVal value As Boolean)
                Me("is-encrypt") = value
            End Set
        End Property
    End Class

End Namespace


